package com.aaa.a1104.demo02;

import java.util.function.BiPredicate;

/**
 * @author 荆豪峰
 * @version 1.0
 */
public class Test04 {
    public static void main(String[] args) {
        //比较两个字符串是否相同.--断言函数式接口.
       //  BiPredicate<String, String> predicate = (t1, t2) -> t1.equals(t2);

        BiPredicate<String, String> predicate = String::equals;
        boolean test = predicate.test("hello", "hello");
        System.out.println(test);

    }
}
